package com.spzx.common.core.interceptor;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.constant.ServiceNameConstants;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

@Component
public class AddInnerHeaderInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        //添加内部调用的请求头
        requestTemplate.header(SecurityConstants.FROM_SOURCE,
                SecurityConstants.INNER);
    }
}
